package com.example.testproject.activity.constraint

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.example.testproject.R
import kotlinx.android.synthetic.main.activity_group.*

/**
 *
 * @ClassName: GroupActivity
 * @Author: 史大拿
 * @CreateDate: 8/16/22$ 1:47 PM$
 * TODO 约束布局中Group的使用
 */
class GroupActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_group)

        var flag = false
        btn.setOnClickListener {
            flag = !flag
            group.visibility = if (flag) View.GONE else View.VISIBLE
        }
    }
}